<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="/scripts/jquery.min.js"></script>
    <script src="/scripts/semantic.min.js"></script>
    <script src="/scripts/jquery.serialize-object.min.js"></script>
    <link rel="stylesheet" href="/styles/semantic.min.css">
    <title>登录页面</title>
    <style type="text/css">
        .errmsg {
            color: red;
        }
    </style>

</head>
<body>
<div class="ui grid container">
    <div class="ui centered six wide column" style="margin-top: 120px;">
        <h2 class="header" style="text-align: center">登录</h2>
        <form class="ui fluid form" id="login-form" action="/loginCheck" method="post">
            <div class="field">
                <label>用户名</label>
                <input type="text" name="username" autocomplete="off" placeholder="请输入用户名">
            </div>
            <div class="field">
                <label>密　码</label>
                <input type="password" name="password" autocomplete="off" placeholder="请输入用户名">
            </div>
            <div class="form-group">
                <label for="inputfile">验证码：</label>
                <input type="text" class="form-control" placeholder="请输入验证码" name="captcha" autocomplete="off"></br>
                <img src="${base}/topic/captcha" id="captcha" onclick="captchaRe()">
            </div>
            <div class="errmsg">${errmsg!""}</div>
            <input type="submit"class="ui fluid primary submit button" value="登录"/>
        </form>
    </div>
</div>
<script>
    function captchaRe() {
    $('#captcha').attr("src", "${base}/topic/captcha?" + Math.random());
}</script>
</body>
</html>